﻿@{
    ViewBag.Title = "Login";
    Layout = null;
}
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>@ViewBag.Title</title>
    <link href="~/Content/default.css" rel="stylesheet" />
    <script src="~/Scripts/jquery-1.9.1.min.js"></script>
    <style type="text/css">
        body { background: none repeat scroll 0 0 #eee; color: #000; font-family: verdana,Arial,Helvetica,sans-serif; font-size: 12px; margin-top: 20px; padding: 32px; }
        .login-Main { background-color: #fff; border-color: #bbb; border-right: 1px solid #bbb; border-style: solid; border-width: 1px; padding: 30px 20px 20px 50px; text-align: left; width: 350px; }
        .login-Heading { color: #904; font-size: 16px; font-weight: bold; margin: 0; padding: 0 0 15px; }
        .block { margin-bottom: 10px; }
        .label-line { display: block; font-size: 12px; margin: 0; }
        .input-text { padding: 4px 2px; vertical-align: middle; width: 200px; }
        a.btn { -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-right-colors: none; -moz-border-top-colors: none; background-color: #f5f5f5; background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); background-repeat: repeat-x; border-color: #cccccc #cccccc #b3b3b3; border-image: none; border-radius: 4px; border-style: solid; border-width: 1px; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05); color: #333333; cursor: pointer; display: inline-block; font-size: 14px; line-height: 20px; margin-bottom: 0; padding: 4px 12px; text-align: center; text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); vertical-align: middle; }
    </style>
    <script type="text/javascript">
        $(function () {
            $('div.m_fault1').css({
                display: function () {
                    if ($($(this).find("li")[0]).text() == "") {
                        return "none";
                    } else {
                        return "block";
                    }
                }
            });
            var request = new Object();
            request = GetRequest();
            var returnUrl = "";
            if (request["ReturnUrl"] != undefined) {
                returnUrl = request["ReturnUrl"];
                $("input[name='ReturnUrl']").val(returnUrl);
            }

            function GetRequest() {
                var url = location.search;
                var theRequest = new Object();
                if (url.indexOf("?") != -1) {
                    var str = url.substr(1);
                    strs = str.split("&");
                    for (var i = 0; i < strs.length; i++) {
                        theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
                    }
                }
                return theRequest;
            }
        });
    </script>

</head>
<body>
    <div style="width: 100%;">
        <div align="center">
            <div class="login-Main">
                <div class="login-Heading">后台登录</div>
                @using (Html.BeginForm("Login", "Account", FormMethod.Post))
                {
                    <div class="block m_fault1">@Html.ValidationSummary()</div>
                    <div class="block">
                        <label class="label-line">登录用户名</label>
                        <input type="text" class="input-text" value="" name="userName">
                    </div>
                    <div class="block">
                        <label class="label-line">密码</label>
                        <input type="password" class="input-text" value="" name="password">
                    </div>
                    <div class="block">
                        <input type="hidden" name="ReturnUrl" />
                        <input id="login_btn" type="submit" class="btn" value="登 录" />
                    </div>
                }
            </div>
        </div>
    </div>
</body>
</html>
